﻿#pragma once
#include"Goods.h"
#include"Armor.h"
#include"Bag.h"
#include"Drug.h"
#include"Wpn.h"
struct item {
	int id;
	int num;
};
class Bag {
public:
	Bag();
	Bag(int m);
	//~Bag();
	void showbag();//展现背包里的物品
	int getGoodsid(int order_g) const;//获取第order_g件物品的id
	int getGoodsnum(int id) const;//获取背包内物品总量
	void addGoods(int id,int num);//向背包里增加物品
	void reduceGoods(int id, int num);//丢弃或者售卖物品
	int getmoney() const;
	int getWpn();
	int getArmor();
	void setWpn(int id);
	void setArmor(int id);
	
	void useWpn();
	double useArmor();
	void setmoney(int money);
	double getAddAtk() const;
	int getDf() const;
	int getAddHp() const;
private:
	//int volume;//背包容量
	//int leftv;//剩余背包容量
	int money;
	struct item items[22];
	Wpn Wpn_hand;
	Armor Armor_body;
	Wpn wpn[10] = { 0,1,2,3,4,5,6,7,8,9 };
	Drug drug[6] = { 10,11,12,13,14,15 };
	Armor armor[6] = { 16,17,18,19,20,21 };
};